package com.icode.core.model.house;

import com.icode.core.dto.house.ForEnumDTO;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-11-9
 * Time: 下午2:37
 * To change this template use File | Settings | File Templates.
 */
public enum HouseBasePrice {

    NOT_LIMIT(""),
    ZERO_TO_FIVE("5万以下"),
    FIVE_TO_TEN("5-10万"),
    TEN_TO_FIFTEEN("10-15万"),
    FIFTEEN_TO_TWENTY("15-20万");

    private String label;

    private HouseBasePrice(String label) {
        this.label = label;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static List<ForEnumDTO> toDTOs() {
        List<ForEnumDTO> forEnumDTOs = new ArrayList<>();
        for (HouseBasePrice houseBasePrice : HouseBasePrice.values()) {
            String value = houseBasePrice.name();
            String label = houseBasePrice.getLabel();
            ForEnumDTO forEnumDTO = new ForEnumDTO(value, label);
            forEnumDTOs.add(forEnumDTO);
        }
        return forEnumDTOs;
    }
}
